package com.zhgxi.zf.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.slave4j.orm.hibernate.BaseEntity;

@Entity
@Table(name = "zf_notice")
public class Notice extends BaseEntity {

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "uid", nullable = false)
	private User user;
	@Column(name = "title", nullable = false, length = 30)
	private String title;
	@Temporal(TemporalType.DATE)
	@Column(name = "ndate", nullable = false)
	private Date ndate;
	@Column(name = "content", nullable = false, length = 65535)
	private String content;

	public Notice() {
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getNdate() {
		return this.ndate;
	}

	public void setNdate(Date ndate) {
		this.ndate = ndate;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}